#pragma once

#include "net/defines.h"

namespace libzq
{
	class ProtocolImpl
	{
	public:
		virtual bool is_null() = 0;
		virtual void parse(const string& in, string& err) = 0;
		virtual string dumps() const = 0;

		virtual void set_method(const string& method) = 0;
		virtual string method() = 0;

		virtual bool is_error() = 0;
		virtual std::tuple<int32_t, string> error() = 0;
		virtual void set_error(const int errorno, const char* errmsg) = 0;
	};
}